# 读取文件
# 将文件写出到bill.txt.bak文件作为备份
# 同时，将文件内标记为测试的数据行进行删除

with open("test/bill.txt","r",encoding="utf-8") as f:
    with open("test/bill.txt.bak", "a", encoding="utf-8") as f2:
        for line in f:
            if "测试" in line:
                continue
            else:
                f2.write(line)

